﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;

namespace SqlDomain
{
    public class Repository :IRepository
    {

        private readonly AdventureWorksDataContext dataContext;

      

        public Repository(string connectionString)
        {
            dataContext = new  AdventureWorksDataContext(connectionString); 
        }
        
        
        #region IRepository Members

        IQueryable<IContact> IRepository.Contacts
        {
            get { return dataContext.Contacts.Cast<IContact>(); }
        }

        #endregion
    }
}
